//
//  WeiboListViewModel.m
//  WeiboAD
//
//  Created by liu guoqiang on 16/7/29.
//  Copyright © 2016年 com.liu.weiboAD. All rights reserved.
//

#import "WeiboListViewModel.h"

@implementation WeiboListViewModel
-(void)getWeibo:(NSDictionary *)dic{
    XCHTTPManager *manager = [XCHTTPManager shareManager];
    NSString *url = [NSString stringWithFormat:@"%@%@",ApiHead,ApigetWeibo];
    NSLog(@"url:%@",url);
    [manager post:url params:dic success:^(id responseObj) {
        //[MBProgressHUD showSuccess:@"上传accessToken成功"];
        NSDictionary *dics = responseObj;
        self.weiboArray = dics[@"statuses"];
        if(_refreshblock){
        self.refreshblock();
        }
        [MBProgressHUD showSuccess:@"请求成功"];
    } failured:^(NSError *error) {
        [MBProgressHUD showError:@"请求失败"];
    }];
    
}
@end
